package org.dromara.quickswing.ui.app.page;

import org.dromara.quickswing.ui.app.QSPrefs;
import org.dromara.quickswing.ui.app.QSWidget;

import javax.swing.*;
import java.awt.*;

public abstract class QSPageScaffold<T extends QSPageItem<? extends QSWidget<? extends QSPrefs>>> extends JPanel {

    protected final T pageItem;

    public QSPageScaffold(T pageItem) {
        this.pageItem = pageItem;
        this.setLayout(new BorderLayout());
        this.add(pageItem, BorderLayout.CENTER);
    }
    protected void onChange(){
        pageItem.onChange();
    }

}
